package ua.kpi_java_training.tyshchenko.module2.test;

import static junit.framework.Assert.*;
import org.junit.Before;
import org.junit.Test;
import ua.kpi_java_training.tyshchenko.module2.KindOfCreatures;
import ua.kpi_java_training.tyshchenko.module2.Statistics;

/**
 * @author Vlad Tyshchenko
 * @version 1.0 5 June 2013
 */
public class StatisticsTest {
    Statistics stat;

    @Before
    public void setUp() {
        stat = new Statistics(20, 20);
    }

    @Test
    public void testAddChildren() {
        for (int i = 1; i < 100; i++) {
            stat.addChildren(KindOfCreatures.predator);
            assertEquals("test amountChildren for predator", stat.getAmountChildrenPredators(), i);
            stat.addChildren(KindOfCreatures.victim);
            assertEquals("test amountChildren for victim", stat.getAmountChildrenVictims(), i);
        }
    }
}
